# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Aaron Griffin <aaron@archlinux.org>

pkgname=goffice
pkgver=0.10.56
pkgrel=1
pkgdesc="A GLib/GTK+ set of document-centric objects and charting library"
url="https://git.gnome.org/browse/goffice"
arch=(loong64 x86_64)
license=(GPL)
depends=(librsvg gtk3 libgsf libspectre libxslt lasem)
makedepends=(intltool gtk-doc gobject-introspection)
source=(https://download.gnome.org/sources/goffice/0.10/goffice-$pkgver.tar.xz)
sha256sums=('b8640a2fee0c0a57784b2a5b92944a2932c789db1039ddf5a269ad634796e7e2')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --sysconfdir=/etc \
      --localstatedir=/var --disable-static --enable-introspection --enable-gtk-doc

  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="${pkgdir}" install
}
